﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <DataTemplate x:Key="AccountInformationTemplate">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="100" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <Label Grid.Column="0" Grid.Row="0" Content="{Binding Resources.AccountName}" />
            <Label Grid.Column="0" Grid.Row="1" Content="{Binding Resources.AccountNumber}" />
            <Label Grid.Column="0" Grid.Row="2" Content="{Binding Resources.AddressName}" />
            <Label Grid.Column="0" Grid.Row="3" Content="Parent Account" />
            <Label Grid.Column="0" Grid.Row="4" Content="Street1" />
            <Label Grid.Column="0" Grid.Row="5" Content="Street2" />
            <Label Grid.Column="0" Grid.Row="6" Content="Street3" />
            <Label Grid.Column="0" Grid.Row="7" Content="County" />
            <Label Grid.Column="0" Grid.Row="8" Content="City" />
            <Label Grid.Column="0" Grid.Row="9" Content="Post Code" />
            <Label Grid.Column="0" Grid.Row="10" Content="Country" />

            <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Path=AccountName, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" MaxLength="100" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Path=AccountNumber, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" MaxLength="100" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Path=AddressName, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Path=ParentAccount, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Path=Street1, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <TextBox Grid.Column="1" Grid.Row="5" Text="{Binding Path=Street2, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <TextBox Grid.Column="1" Grid.Row="6" Text="{Binding Path=Street3, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <TextBox Grid.Column="1" Grid.Row="7" Text="{Binding Path=County, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <TextBox Grid.Column="1" Grid.Row="8" Text="{Binding Path=City, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <TextBox Grid.Column="1" Grid.Row="9" Text="{Binding Path=PostCode, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" HorizontalAlignment="Left" VerticalAlignment="Top" />
            <ComboBox Grid.Column="1" Grid.Row="10" SelectedValue="{Binding Path=Country, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" IsSynchronizedWithCurrentItem="True" />

            <Grid Grid.Column="0" Grid.Row="11" Grid.ColumnSpan="2" Grid.IsSharedSizeScope="True" HorizontalAlignment="Right">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition SharedSizeGroup="Buttons" />
                    <ColumnDefinition SharedSizeGroup="Buttons" />
                </Grid.ColumnDefinitions>
                <Button Content="OK" Padding="3.5,0,3.5,0" Margin="3" />
                <Button Content="Cancel" Padding="3.5,0,3.5,0" Grid.Column="1" Margin="3.5"/>
            </Grid>

        </Grid>

    </DataTemplate>
    
</ResourceDictionary>